<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<img id="pic" src="1.jpg" height="200px"/>
<input onclick="kaiGuanDeng()" type="button" id="anniu" value="吃榴莲">
<script>
    function kaiGuanDeng() {
        if(anniu.value=="吃榴莲"){
            pic.src="2.jpg";
            anniu.value="吃草莓";
        }else {
            pic.src="1.jpg";
            anniu.value="吃榴莲";
        }
    }
</script>
</body>
</html>